<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
  </head>
  <body>
    <form id="myform" action="https:www.baidu.com" method="get">
      <span>邮箱：</span>
      <input type="text" name="email" />
      <button submit>提交</button>
    </form>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.20.0/jquery.validate.min.js"></script>
    <script src="./message_cn.js"></script>
    <script>
      $('#myform').validate({
        rules: {
          // 这里可以使用字符串"required",也可以使用{required:true}
          name: 'required',
          // 组合规则。
          email: {
            required: true,
            //符合email规则
            email: true,
          },
        },
      })
      console.log('添加验证')
    </script>
  </body>
</html>
